package com.zyong.design.pattern.strategy.case3;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-04-14 13:21
 */
public class Client {
    public static void main(String[] args) {
        FlyBehavior flyBehavior = new GoodFlyBehavior();
        QuackBehavior quackBehavior = new GaGaQuackBehavior();
        SwimBehavior swimBehavior = new GoodSwimBehavior();

        Duck duck = new PekingDuck();

        duck.setFlyBehavior(flyBehavior);
        duck.setQuackBehavior(quackBehavior);
        duck.setSwimBehavior(swimBehavior);

        duck.display();
        duck.fly();
        duck.quack();
        duck.swim();
    }
}
